import request from '@/utils/request'

export function getClassroomList(tenantId, name) {
  return request({
    url: '/ops/classroom/list',
    method: 'get',
    params: {tenantId: tenantId, name: name}
  })
}

export function getRecommendClassroomList(params) {
  return request({
    url: '/ops/classroom/recommendList',
    method: 'get',
    params: {tenantId: params}
  })
}

export function updateClassroom(data) {
  return request({
    url: '/ops/classroom/update',
    method: 'post',
    data
  })
}

export function saveClassRoom(data) {
  return request({
    url: '/ops/classroom/add',
    method: 'post',
    data
  })
}

export function deleteClassroom(id) {
  return request({
    url: '/ops/classroom/delete',
    method: 'get',
    params: {id}
  })
}

export function deleteCourse(id) {
  return request({
    url: '/ops/classroom/courseDelete',
    method: 'get',
    params: {id}
  })
}

export function getClassroomDetail(id) {
  return request({
    url: '/ops/classroom/getDetail',
    method: 'get',
    params: {id}
  })
}

export function saveClassRoomCourses(data) {
  return request({
    url: '/ops/classroom/saveClassRoomCourses',
    method: 'post',
    data
  })
}

